<?php

/**
 * memberzoneComments actions.
 *
 * @package    jobeet
 * @subpackage memberzoneComments
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class memberzoneCommentsActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->forward('default', 'module');
  }

  public function executeDeleteComment(sfWebRequest $request){
	$comment = Doctrine::getTable('ProductComment')->findOneByUserIdAndId(
		$this->getUser()->getObject()->getId(),
		$request->getParameter('commentID', -1)
	);

	if($comment){
		$comment->delete();
	}

	$this->redirect($request->getReferer());

  }
}
